package com.breakfast.fun.data.entity.user.order;

import com.breakfast.fun.data.entity.user.ShopData;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created by hp on 2016/8/25.
 */
public class OrderData {

    /**
     * id : 40600
     * orderTime : 2016-08-25 20:33:02
     * orderNo : F201608252033025407
     * totalPrice : 76.1
     * payPrice : 76.1
     * freePrice : 0
     * payFree : 0
     * quantity : 8
     * refundState : 0
     * state : 0
     * payState : 0
     * consignee : 余凯
     * userMobile : 18359928629
     * detail : 车库咖啡三楼早范
     * sendDate : 周套餐
     * sendTime : 08:00~08:15
     * remark :
     * parentId : 0
     * isMuti : 1
     * activityName :
     * shopName : 周套餐
     * isPackage : 1
     * shopData : {"太极膳":[],"肚子里有料":[],"淘麦多":[],"蒸馍坊":[],"粗粮兄弟":[]}
     */

    private int id;
    private String orderTime;
    private String orderNo;
    private double totalPrice;
    private double payPrice;
    private double freePrice;
    private int payFree;
    private int quantity;
    private int refundState;
    private int state;
    private int payState;
    private String consignee;
    private String userMobile;
    private String detail;
    private String sendDate;
    private String sendTime;
    private String remark;
    private int parentId;
    private int isMuti;
    private String activityName;
    private String shopName;
    private int isPackage;
    private Map<String, List<ShopData>> shopData;

    public static OrderData objectFromData(String str) {

        return new Gson().fromJson(str, OrderData.class);
    }

    public static List<OrderData> arrayOrderDataFromData(String str) {

        Type listType = new TypeToken<ArrayList<OrderData>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public double getPayPrice() {
        return payPrice;
    }

    public void setPayPrice(double payPrice) {
        this.payPrice = payPrice;
    }

    public double getFreePrice() {
        return freePrice;
    }

    public void setFreePrice(double freePrice) {
        this.freePrice = freePrice;
    }

    public int getPayFree() {
        return payFree;
    }

    public void setPayFree(int payFree) {
        this.payFree = payFree;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public int getRefundState() {
        return refundState;
    }

    public void setRefundState(int refundState) {
        this.refundState = refundState;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getPayState() {
        return payState;
    }

    public void setPayState(int payState) {
        this.payState = payState;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public String getUserMobile() {
        return userMobile;
    }

    public void setUserMobile(String userMobile) {
        this.userMobile = userMobile;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getSendDate() {
        return sendDate;
    }

    public void setSendDate(String sendDate) {
        this.sendDate = sendDate;
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public int getIsMuti() {
        return isMuti;
    }

    public void setIsMuti(int isMuti) {
        this.isMuti = isMuti;
    }

    public String getActivityName() {
        return activityName;
    }

    public void setActivityName(String activityName) {
        this.activityName = activityName;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public int getIsPackage() {
        return isPackage;
    }

    public void setIsPackage(int isPackage) {
        this.isPackage = isPackage;
    }

    public Map<String, List<ShopData>> getShopData() {
        return shopData;
    }

    public void setShopData(Map<String, List<ShopData>> shopData) {
        this.shopData = shopData;
    }

}
